package com.bootdo.system.domain;

import com.bootdo.common.persistence.DataEntity;

import java.util.List;

public class RoleDO extends DataEntity<RoleDO>{

	private String roleName;
	private String roleSign;
	private String userIdCreate;
	private List<String> menuIds;

	private String dataScope;// 数据范围
	private UserDO user;		// 根据用户ID查询角色列表

	// 数据范围（1：所有数据；2：所在公司及以下数据；3：所在公司数据；4：所在部门及以下数据；5：所在部门数据；8：仅本人数据；9：按明细设置）
	public static final String DATA_SCOPE_ALL = "1";
	public static final String DATA_SCOPE_COMPANY_AND_CHILD = "2";
	public static final String DATA_SCOPE_COMPANY = "3";
	public static final String DATA_SCOPE_OFFICE_AND_CHILD = "4";
	public static final String DATA_SCOPE_OFFICE = "5";
	public static final String DATA_SCOPE_SELF = "8";
	public static final String DATA_SCOPE_CUSTOM = "9";

	public RoleDO() {
		super();
		this.dataScope = DATA_SCOPE_SELF;
	}

	public RoleDO(String id){
		super(id);
	}

	public RoleDO(UserDO user) {
		this();
		this.user = user;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleSign() {
		return roleSign;
	}

	public void setRoleSign(String roleSign) {
		this.roleSign = roleSign;
	}

	public String getUserIdCreate() {
		return userIdCreate;
	}

	public void setUserIdCreate(String userIdCreate) {
		this.userIdCreate = userIdCreate;
	}

	public List<String> getMenuIds() {
		return menuIds;
	}

	public void setMenuIds(List<String> menuIds) {
		this.menuIds = menuIds;
	}

	public String getDataScope() {
		return dataScope;
	}

	public void setDataScope(String dataScope) {
		this.dataScope = dataScope;
	}

	@Override
	public String toString() {
		return "RoleDO{" +
				"id='" + id + '\'' +
				", roleName='" + roleName + '\'' +
				", roleSign='" + roleSign + '\'' +
				", userIdCreate='" + userIdCreate + '\'' +
				", menuIds=" + menuIds +
				", createBy='" + createBy + '\'' +
				", createDate=" + createDate +
				", updateBy='" + updateBy + '\'' +
				", updateDate=" + updateDate +
				", remarks='" + remarks + '\'' +
				", delFlag='" + delFlag + '\'' +
				'}';
	}
}
